home *** CD-ROM | disk | FTP | other *** search
/ Super PC 34 / Super PC 34 (Shareware).iso / spc / UTIL / DJGPP2 / V2 / DJLSR200.ZIP / src / libc / posix / glob / glob.txh < prev    next >
Encoding:
Text File  |  1995-07-23  |  1.4 KB  |  67 lines

  1. @node glob, shell
  2. @subheading Syntax
  3.  
  4. @example
  5. #include <glob.h>
  6.  
  7. int  glob(const char *_pattern, int _flags,
  8.           int (*_errfunc)(const char *_epath, int _eerrno), glob_t *_pglob);
  9. @end example
  10.  
  11. @subheading Description
  12.  
  13. This function performs command-line wildcard expansion.  The pattern
  14. to be expanded is passed as @var{pattern}, and a pointer to a
  15. structure is passed via @var{_pglob}.  This structure is like this:
  16.  
  17. @example
  18. typedef struct @{
  19.   size_t gl_pathc;
  20.   char **gl_pathv;
  21.   size_t gl_offs;
  22. @} glob_t;
  23. @end example
  24.  
  25. The @code{gl_pathc} and @code{gl_pathv} fields define a list of
  26. matches.  The @code{gl_offs} field indicates that the list should be
  27. offset.
  28.  
  29. The structure is filled in with information about the files that
  30. matched the wildcard.  Values for @var{_flags} are as follows:
  31.  
  32. @table @code
  33.  
  34. @item GLOB_APPEND
  35.  
  36. Append matches to a pre-existing structure.
  37.  
  38. @item GLOB_DOOFFS
  39.  
  40. Skip _pglob->gl_offs entries in gl_pathv.
  41.  
  42. @item GLOB_ERR
  43.  
  44. Stop when an unreadable directory is encountered.
  45.  
  46. @item GLOB_MARK
  47.  
  48. Append a slash to each pathname that is a directory.
  49.  
  50. @item GLOB_NOCHECK
  51.  
  52. If no matches are found, return the pattern itself as the only match.
  53.  
  54. @item GLOB_NOESCAPE
  55.  
  56. Disable blackslash as an escape character.
  57.  
  58. @item GLOB_NOSORT
  59.  
  60. Do not sort the returned list.
  61.  
  62. @end table
  63.  
  64. @subheading Return Value
  65.  
  66. Zero on success.
  67.